﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vit.Web.Mvc.DataAnnotations
{
    [AttributeUsage(AttributeTargets.Class|AttributeTargets.Enum, AllowMultiple = false, Inherited = false)]
    public sealed class DataSourceProviderAttribute : Attribute
    {
        public DataSourceProviderAttribute()
        {
        }

        public DataSourceProviderAttribute(Type dataContextType, Type entityType, string textFieldName, string valueFieldName)
        {
            this.DataContextType = dataContextType;
            this.EntityType = entityType;
            this.TextFieldName = textFieldName;
            this.ValueFieldName = valueFieldName;
        }

        public Type DataContextType { get; set; }
        public Type EntityType { get; set; }
        public string TextFieldName { get; set; }
        public string ValueFieldName { get; set; }
    }
}
